syntax on
set bg=dark
set hlsearch
set incsearch
set autoindent
set smartindent
au BufRead,BufNewFile *.c,*.cpp,*.cc,*.h,*.am highlight TrailingWhitespace ctermbg=red guibg=red
au BufRead,BufNewFile *.c,*.cpp,*.cc,*.h,*.am match TrailingWhitespace /\s\+$/
au BufRead,BufNewFile *.edc set filetype=edc
au! Syntax edc source $VIM/vimcurrent/syntax/c.vim
au BufRead,BufNewFile *.sip set filetype=sip
au! Syntax sip source $VIM/vimcurrent/syntax/cpp.vim
au BufRead,BufNewFile *.vala set filetype=vala
au! Syntax vala source $VIM/vimcurrent/syntax/cs.vim

if &termencoding == "utf-8"
   set list listchars=tab:»·,trail:·,extends:…
else
   set list listchars=tab:>-,trail:.,extends:>
endif



map gf :e <cfile><CR>
map <S-F4> /\%>80v.\+<CR><LF>
map <S-F5> :make all run<CR>

map <TAB> :bn<CR>
map <S-TAB> :bN<CR>

set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
let python_highlight_all = 1

let glib_deprecated_errors = 1
let gobject_deprecated_errors = 1
let gdk_deprecated_errors = 1
let gdkpixbuf_deprecated_errors = 1
let gtk_deprecated_errors = 1
let gimp_deprecated_errors = 1
let gconf_deprecated_errors = 1
let libgnome_deprecated_errors = 1
let libgnomeui_deprecated_errors = 1
let libglade_deprecated_errors = 1
let pango_deprecated_errors = 1
let librsvg_deprecated_errors = 1

fun! ShowFuncName()
  let lnum = line(".")
  let col = col(".")
  echohl ModeMsg
  echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bW'))
  echohl None
  call search("\\%" . lnum . "l" . "\\%" . col . "c")
endfun
map f :call ShowFuncName() <CR>

if version < 600
  so <sfile>:p:h/atk.vim
  so <sfile>:p:h/cairo.vim
  so <sfile>:p:h/gconf.vim
  so <sfile>:p:h/gdkpixbuf.vim
  so <sfile>:p:h/gdk.vim
  so <sfile>:p:h/gimp.vim
  so <sfile>:p:h/glib.vim
  so <sfile>:p:h/gobject.vim
  so <sfile>:p:h/gtkglext.vim
  so <sfile>:p:h/gtk.vim
  so <sfile>:p:h/libglade.vim
  so <sfile>:p:h/libgnomecanvas.vim
  so <sfile>:p:h/libgnomeui.vim
  so <sfile>:p:h/libgnome.vim
  so <sfile>:p:h/libgsf.vim
  so <sfile>:p:h/libnotify.vim
  so <sfile>:p:h/librsvg.vim
  so <sfile>:p:h/libwnck.vim
  so <sfile>:p:h/linc.vim
  so <sfile>:p:h/orbit2.vim
  so <sfile>:p:h/pango.vim
  so <sfile>:p:h/vte.vim
  so <sfile>:p:h/xlib.vim
else
  runtime! syntax/atk.vim
  runtime! syntax/cairo.vim
  runtime! syntax/gconf.vim
  runtime! syntax/gdkpixbuf.vim
  runtime! syntax/gdk.vim
  runtime! syntax/gimp.vim
  runtime! syntax/glib.vim
  runtime! syntax/gobject.vim
  runtime! syntax/gtkglext.vim
  runtime! syntax/gtk.vim
  runtime! syntax/libglade.vim
  runtime! syntax/libgnomecanvas.vim
  runtime! syntax/libgnomeui.vim
  runtime! syntax/libgnome.vim
  runtime! syntax/libgsf.vim
  runtime! syntax/libnotify.vim
  runtime! syntax/librsvg.vim
  runtime! syntax/libwnck.vim
  runtime! syntax/linc.vim
  runtime! syntax/orbit2.vim
  runtime! syntax/pango.vim
  runtime! syntax/vte.vim
  runtime! syntax/xlib.vim
endif

" vim: set ft=vim :
